﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TaskManagerApp.Model
{
    public interface ITaskRepository
    {
        /// <summary>
        /// Raised when a task is placed into the repository.
        /// </summary>
        event EventHandler<TaskEventArgs> taskAdded;

        event EventHandler<TaskEventArgs> taskRemoved;

        /// <summary>
        /// Places the specified task into the repository.
        /// If the task is already in the repository, an
        /// exception is not thrown.
        /// </summary>
        void AddTask(ITask task);

        /// <summary>
        /// Removes the specified task from the repository.
        /// </summary>
        void RemoveTask(ITask task);


        /// <summary>
        /// Returns true if the specified task exists in the
        /// repository, or false if it is not.
        /// </summary>
        bool ContainsTask(ITask task);

        /// <summary>
        /// Returns a shallow-copied list of all tasks in the repository.
        /// </summary>
        List<ITask> GetTasks();
    }
}
